#include "lv_user_ui.h"
#include "lv_user.h"
#include "app.h"
#include "io.h"

LV_IMG_DECLARE(logo)
static ui_logo_page logo_page;

static void lv_task_logo_handler(lv_timer_t * timer)
{
    lv_timer_del(timer);
    lv_obj_del(logo_page.logo);
    main_page_init();
}

void ui_logo_load(void)
{
    logo_page.logo = lv_img_create(lv_scr_act());
    lv_img_set_src(logo_page.logo, &logo);
    lv_obj_center(logo_page.logo);
    
    lv_timer_create(lv_task_logo_handler, 3000, NULL);
}
